"""
Project Name : api_automation_framework
File Name : deny-demo.py
Author : lldhsds
Date : 2024/12/28 00:11
Description: /deny, 返回一个由 robots.txt 规则拒绝访问的页面。
"""

import requests

# GET: /deny
# Returns page denied by robots.txt rules.
# parameters: None
# response: 200(Denied message)

def deny_demo():
    headers = {'accept': 'text/plain'}
    response = requests.get('https://httpbin.org/deny', headers=headers)
    print(response.status_code)
    print(response.text)
    print(response.headers)

deny_demo()